package com.fy.fyai;

import org.springframework.ai.chat.client.ChatClient;
import org.springframework.ai.chat.memory.ChatMemory;
import org.springframework.ai.tool.ToolCallbackProvider;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

@SpringBootApplication
public class FyAiApplication {

    public static void main(String[] args) {
        SpringApplication.run(FyAiApplication.class, args);
        System.out.println("----->项目启动成功<-----");
    }

    @Bean
    public ChatClient initChatClient(ChatClient.Builder chatClientBuilder,
                                     ToolCallbackProvider mcpTools) {
        return chatClientBuilder
                .defaultTools(mcpTools)
                .build();
    }

}
